package com.baor.controller;

import com.baor.service.PaymentFailedService;
import com.baor.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/payment")
public class PaymentFailedController {
    @Autowired
    private PaymentFailedService paymentFailedService;

    /**
     * 获取打款失败列表
     */
    @RequestMapping("/failurelist")
    public R failurelist(@RequestBody Map<String, Object> params) {
        return paymentFailedService.paymentFailedList(params);
    }

    /**
     * 同步打款失败记录
     */
    @RequestMapping("/syncFailure")
    public R syncFailure() {
        return paymentFailedService.syncFailedPayments();
    }
}